ci: use multiarch runners for docker builds#379
Closed
ricky-undeadcoders wants to merge 3 commits intomainfrom
Closed
ci: use multiarch runners for docker builds#379ricky-undeadcoders wants to merge 3 commits intomainfrom
ricky-undeadcoders wants to merge 3 commits intomainfrom
Conversation
iainlane
reviewed
Oct 17, 2025
Member
iainlane
left a comment
There was a problem hiding this comment.
Thanks for this! Just had a few comments which could all be due to my lack of understanding 😁
A general q: should we wait until grafana/shared-workflows#1348 is merged? As far as I can see we could use a reusable workflow since we don't do anything fancy...
| uses: grafana/shared-workflows/actions/docker-import-digests-push-manifest@cd422befbbda65e0612a63627e8c8820d86bc2a6 # docker-import-digests-push-manifest/v0.1.0 | ||
| with: | ||
| images: ${{ needs.build-and-export-digest.outputs.images }} | ||
| push: false |
| needs: build-and-export-digest | ||
| permissions: | ||
| contents: read | ||
| id-token: write |
| registries: "dockerhub" | ||
| platforms: ${{ matrix.platform }} | ||
| outputs: "type=image,push-by-digest=true,name-canonical=true,push=false" | ||
| push: false |
Member
There was a problem hiding this comment.
Is it right that we're never pushing? Perhaps I'm understanding the flag incorrectly
| digest: ${{ steps.build.outputs.digest }} | ||
| platform: ${{ matrix.platform }} | ||
|
|
||
| push-manifest: |
Member
There was a problem hiding this comment.
Could this be conditional on whether we're pushing or not? We could skip the job on PRs, AFAIK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the Docker build workflow in
.github/workflows/build.ymlto improve support for multi-architecture images and streamline digest handling. The workflow now builds images for each platform separately, exports their digests, and then constructs a multi-arch manifest using those digests.Multi-Architecture Build and Digest Export:
mainjob with abuild-and-export-digestjob that uses a matrix strategy to build Docker images for bothlinux/arm64andlinux/amd64platforms, and exports their digests for later use.build-push-to-dockerhubaction to the newerdocker-build-push-imageaction.docker-export-digestaction.Manifest Construction:
push-manifestjob that depends on the completion of the multi-arch builds, and uses thedocker-import-digests-push-manifestaction to construct and upload a manifest referencing the built images for each architecture.